//
//  NSData+AES.h
//  CLExtension
//
//  Created by CharlieLiao on 2017/8/2.
//  Copyright © 2017年 Charlie. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SecurityDefine.h"

@interface NSData (CLAES)

/// AES加密 iv=nil SecurityPaddingZero SecurityModeCBC
- (NSData*)encryptAESWithKey:(NSString*)key;

/// AES解密 iv=nil SecurityPaddingZero SecurityModeCBC
- (NSData*)decryptAESWithKey:(NSString*)key;

/// AES加密
- (NSData*)encryptAESWithKey:(NSString*)key andIV:(NSString *)iv padding:(SecurityPadding)padding mode:(SecurityMode)mode;

/// AES解密
- (NSData*)decryptAESWithKey:(NSString*)key andIV:(NSString *)iv padding:(SecurityPadding)padding mode:(SecurityMode)mode;


@end
